home *** CD-ROM | disk | FTP | other *** search
/ Hyper Stacks 1994 May / Hyper Stacks (Pacific HiTech)(1994)[Mac].iso / HyperTalk / AppleTalk Toolkit v.2.5 / MISC / AppleTalk.h next >
Encoding:
C/C++ Source or Header  |  1987-07-20  |  20.1 KB  |  852 lines  |  [TEXT/MPS ]

  1. /*
  2.     AppleTalk.h -- AppleTalk Manager
  3.     
  4.     C Interface to the Macintosh Libraries
  5.     Copyright Apple Computer,Inc. 1985-1987
  6.     All rights reserved.
  7. */
  8.  
  9. #ifndef __APPLETALK__
  10. #define __APPLETALK__
  11. #ifndef __TYPES__
  12. #include <Types.h>
  13. #endif
  14.  
  15.                 /* AFPCall command codes */
  16.  
  17. #define afpByteRangeLock    1
  18. #define afpVolClose            2
  19. #define afpDirClose            3
  20. #define afpForkClose        4
  21. #define afpCopyFile            5
  22. #define afpDirCreate        6
  23. #define afpFileCreate        7
  24. #define afpDelete            8
  25. #define afpEnumerate        9
  26. #define afpFlush            10
  27. #define afpForkFlush        11
  28. #define afpGetDirParms        12
  29. #define afpGetFileParms        13
  30. #define afpGetForkParms        14
  31. #define afpGetSInfo            15
  32. #define afpGetSParms        16
  33. #define afpGetVolParms        17
  34. #define afpLogin            18
  35. #define afpContLogin        19
  36. #define afpLogout            20
  37. #define afpMapID            21
  38. #define afpMapName            22
  39. #define afpMove                23
  40. #define afpOpenVol            24
  41. #define afpOpenDir            25
  42. #define afpOpenFork            26
  43. #define afpRead                27
  44. #define afpRename            28
  45. #define afpSetDirParms        29
  46. #define afpSetFileParms        30
  47. #define afpSetForkParms        31
  48. #define afpSetVolParms        32
  49. #define afpWrite            33
  50. #define afpGetFlDrParms        34
  51. #define afpSetFlDrParms        35
  52.  
  53. #define afpDTOpen            48
  54. #define afpDTClose            49
  55. #define afpGetIcon            51
  56. #define afpGtIcnInfo        52
  57. #define afpAddAPPL            53
  58. #define afpRmvAPPL            54
  59. #define afpGetAPPL            55
  60. #define afpAddCmt            56
  61. #define afpRmvCmt            57
  62. #define afpGetCmt            58
  63.  
  64. #define afpAddIcon            192            /* Special code for ASP Write commands */
  65.  
  66.                 /* ASP miscellaneous */
  67.  
  68. #define xppLoadedBit        5                /* XPP bit in PortBUse */
  69. #define xppUnitNum            40                /* Unit number for XPP (old ROMs) */
  70. #define xppRefNum            -41                /* .XPP reference number */
  71.  
  72. #define scbMemSize            0xC0             /* Size of memory for SCB */
  73.  
  74. #define xppFlagClr            0x00            /* constants for AFPCommandBlock */
  75. #define xppFlagSet            0x80            /* StartEndFlag & NewLineFlag fields. */
  76.  
  77. #define lapSize 20
  78. #define ddpSize 26
  79. #define nbpSize 26
  80. #define atpSize 56
  81.  
  82.  
  83. enum {
  84.     tLAPRead,tLAPWrite,tDDPRead,tDDPWrite,tNBPLookup,
  85.     tNBPConfirm,tNBPRegister,tATPSndRequest,tATPGetRequest,
  86.     tATPSdRsp,tATPAddRsp,tATPRequest,tATPResponse};
  87. typedef unsigned char ABCallType;
  88. enum {
  89.     lapProto,ddpProto,nbpProto,atpProto};
  90. typedef unsigned char ABProtoType;
  91. typedef struct LAPAdrBlock {
  92.     unsigned char dstNodeID,srcNodeID,lapProtType;
  93. } LAPAdrBlock;
  94. typedef struct AddrBlock {
  95.     short aNet; unsigned char aNode,aSocket;
  96. } AddrBlock;
  97. typedef struct EntityName {
  98.     String(32) objStr,typeStr,zoneStr;
  99. } EntityName,*EntityPtr;
  100. typedef struct RetransType {
  101.     unsigned char retransInterval,retransCount;
  102. } RetransType;
  103. typedef char BitMapType;
  104. typedef struct BDSElement {
  105.     short buffSize;
  106.     Ptr buffPtr;
  107.     short dataSize;
  108.     long userBytes;
  109. } BDSElement,BDSType[8];
  110. typedef BDSType *BDSPtr;
  111. typedef struct ATLAPRec {
  112.     ABCallType abOpcode;
  113.     short abResult;
  114.     long abUserReference;
  115.     LAPAdrBlock lapAddress;
  116.     short lapReqCount;
  117.     short lapActCount;
  118.     Ptr lapDataPtr;
  119. } ATLAPRec,*ATLAPRecPtr,**ATLAPRecHandle;
  120. typedef struct ATDDPRec {
  121.     ABCallType abOpcode;
  122.     short abResult;
  123.     long abUserReference;
  124.     short ddpType;
  125.     short ddpSocket;
  126.     AddrBlock ddpAddress;
  127.     short ddpReqCount;
  128.     short ddpActCount;
  129.     Ptr ddpDataPtr;
  130.     short ddpNodeID;
  131. } ATDDPRec,*ATDDPRecPtr,**ATDDPRecHandle;
  132. typedef struct ATNBPRec {
  133.     ABCallType abOpcode;
  134.     short abResult;
  135.     long abUserReference;
  136.     EntityPtr nbpEntityPtr;
  137.     Ptr nbpBufPtr;
  138.     short nbpBufSize;
  139.     short nbpDataField;
  140.     AddrBlock nbpAddress;
  141.     RetransType nbpRetransmitInfo;
  142. } ATNBPRec,*ATNBPRecPtr,**ATNBPRecHandle;
  143. typedef struct ATATPRec {
  144.     ABCallType abOpcode;
  145.     short abResult;
  146.     long abUserReference;
  147.     short atpSocket;
  148.     AddrBlock atpAddress;
  149.     short atpReqCount;
  150.     Ptr atpDataPtr;
  151.     BDSPtr atpRspBDSPtr;
  152.     BitMapType atpBitMap;
  153.     short atpTransID;
  154.     short atpActCount;
  155.     long atpUserData;
  156.     Boolean atpXO;
  157.     Boolean atpEOM;
  158.     short atpTimeOut;
  159.     short atpRetries;
  160.     short atpNumBufs;
  161.     short atpNumRsp;
  162.     short atpBDSSize;
  163.     long atpRspUData;
  164.     Ptr atpRspBuf;
  165.     short atpRspSize;
  166. } ATATPRec,*ATATPRecPtr,**ATATPRecHandle;
  167.  
  168.  
  169.                 /* structures for ASP & .XPP */
  170.  
  171. typedef struct 
  172. {
  173.     char        cmdByte;
  174.     char        startEndFlag;
  175.     short        forkRefNum;
  176.     long        rwOffset;
  177.     long        reqCount;
  178.     char        newLineFlag;
  179.     char        newLineChar;
  180. } AFPCommandBlock;
  181.  
  182.  
  183. #define XPPPBHeader \
  184.     struct QElem    *qLink;            /* next queue entry */ \
  185.     short            qType;             /* queue type */ \
  186.     short            ioTrap;            /* routine trap */ \
  187.     Ptr                ioCmdAddr;        /* routine address */ \
  188.     ProcPtr            ioCompletion;    /* completion routine */ \
  189.     OSErr            ioResult;        /* result code */ \
  190.     long            cmdResult;        /* Command result (ATP user bytes) */ \
  191.     short            ioVRefNum;        /* volume reference or drive number */ \
  192.     short            ioRefNum;        /* driver reference number ) */ \
  193.     short            csCode            /* Call command code */
  194.  
  195. typedef struct 
  196. {
  197.     XPPPBHeader;            
  198.     short        sessRefnum;        /* Offset to session refnum */
  199.     char        aspTimeout;        /* Timeout for ATP */
  200.     char        aspRetry;        /* Retry count for ATP */
  201.     short        cbSize;            /* Command block size */
  202.     Ptr            cbPtr;            /* Command block pointer */
  203.     short        rbSize;            /* Reply buffer size */
  204.     Ptr            rbPtr;            /* Reply buffer pointer */
  205.     short        wdSize;            /* Write data size */
  206.     Ptr            wdPtr;            /* Write data pointer */
  207.     char        ccbStart[296];    /* CCB memory allocated for driver */
  208.                                 /*afpWrite max size(CCB) = 296; all other calls = 150*/
  209. } XPPPrmBlk;
  210.     
  211. typedef struct 
  212. {
  213.     XPPPBHeader;            
  214.     short        sessRefnum;        /* Offset to session refnum */
  215.     char        aspTimeout;        /* Timeout for ATP */
  216.     char        aspRetry;        /* Retry count for ATP */
  217.     short        cbSize;            /* Command block size */
  218.     Ptr            cbPtr;            /* Command block pointer */
  219.     short        rbSize;            /* Reply buffer size */
  220.     Ptr            rbPtr;            /* Reply buffer pointer */
  221.     AddrBlock    afpAddrBlock;    /* Address block in AFP login */
  222.     Ptr            afpSCBPtr;        /* SCB pointer in AFP login */
  223.     Ptr            afpAttnRoutine;    /* Attn routine pointer in AFP login */
  224.     char        ccbFill[150-6];    /* CCB memory allocated for driver */
  225.                                 /* Login needs only 150 bytes, BUT CCB really starts in the
  226.                                    middle of AFPSCBPtr and also clobbers AFPAttnRoutine. */
  227. } AFPLoginPrm;
  228.     
  229. typedef struct 
  230. {
  231.     XPPPBHeader;            
  232.     short        sessRefnum;        /* Offset to session refnum */
  233.     char        aspTimeout;        /* Timeout for ATP */
  234.     char        aspRetry;        /* Retry count for ATP */
  235.     AddrBlock    serverAddr;        /* Server address block */
  236.     Ptr            scbPointer;        /* SCB pointer */
  237.     Ptr            attnRoutine;    /* Attention routine pointer */
  238. } ASPOpenPrm, *ASPOpenPrmPtr;
  239.  
  240. typedef struct 
  241. {
  242.     XPPPBHeader;            
  243.     Ptr            abortSCBPtr;    /* SCB pointer for AbortOS */
  244. } ASPAbortPrm;
  245.  
  246. typedef struct 
  247. {
  248.     XPPPBHeader;            
  249.     short        aspMaxCmdSize;    /* For SPGetParms */
  250.     short        aspQuantumSize;
  251.     short        numSesss;
  252. } ASPGetparmsBlk;
  253.     
  254. typedef union 
  255. {
  256.     XPPPrmBlk         XPP;
  257.     ASPGetparmsBlk     GETPARM;
  258.     ASPAbortPrm     ABORT;
  259.     ASPOpenPrm         OPEN;
  260.     AFPLoginPrm     LOGIN;
  261. } XPPParamBlock, *XPPParmBlkPtr;
  262.  
  263. /*******************************************/
  264.         /* MPP & ATP structures */
  265.  
  266. typedef struct
  267. {
  268.     short            entrylength;
  269.     Ptr                entryPtr;
  270. } wdselement;
  271.  
  272. typedef struct                                /* returned by NBPLookup */
  273. {
  274.     AddrBlock        nteAddress;                /* network address of entity */
  275.     char            filler;
  276.     char            entityData[99];            /* Object, Type, & Zone */
  277. } NTElement;
  278.  
  279. typedef struct                                /* used for NBPRegister */
  280. {
  281.     Ptr                qNext;                    /* ptr to next NTE */
  282.     NTElement        nt;
  283. } NamesTableEntry;
  284.  
  285. #define    MPPATPHeader    \
  286.     struct QElem    *qLink;                    /* next queue entry */ \
  287.     short            qType;                     /* queue type */\
  288.     short            ioTrap;                    /* routine trap */\
  289.     Ptr                ioCmdAddr;                /* routine address */ \
  290.     ProcPtr            ioCompletion;            /* completion routine */\
  291.     OSErr            ioResult;                /* result code */\
  292.     long            userData;                /* Command result (ATP user bytes) */\
  293.     short            reqTID;                    /* request transaction ID */\
  294.     short            ioRefNum;                /* driver reference number */\
  295.     short            csCode;                    /* Call command code */
  296.  
  297. typedef struct
  298. {    
  299.     MPPATPHeader
  300. } MPPparms;
  301.  
  302. typedef struct
  303. {
  304.     MPPATPHeader
  305.     char            protType;                /* ALAP protocol Type */
  306.     char            filler;
  307.     union
  308.     {
  309.         Ptr            wdsPointer;                /* -> write data structure */
  310.         Ptr            handler;                /* -> protocol handler routine */
  311.     } LAPptrs;
  312. } LAPparms;
  313.  
  314. typedef struct
  315. {
  316.     MPPATPHeader
  317.     char            socket;                    /* socket number */
  318.     char            checksumFlag;            /* check sum flag */
  319.     union
  320.     {
  321.         Ptr            wdsPointer;                /* -> write data structure */
  322.         Ptr            listener;                /* ->write data structure or -> Listener*/
  323.     } DDPptrs;
  324. } DDPparms;
  325.  
  326. typedef struct
  327. {
  328.     MPPATPHeader
  329.     char            interval;                /* retry interval */
  330.     char            count;                    /* retry count */
  331.     union
  332.     {
  333.         Ptr            ntQElPtr;                /* ->names table */
  334.         Ptr            entityPtr;                /* ->entity name*/
  335.     } NBPPtrs;
  336.     union
  337.     {
  338.         char        verifyFlag;                /* set if verify needed */
  339.         struct
  340.         {
  341.             Ptr        retBuffPtr;                /* ->return buffer */
  342.             short    retBuffSize;            /* return buffer size */
  343.             short    maxToGet;                /* matches to get */
  344.             short    numGotten;                /* matches gotten */
  345.         } Lookup;
  346.         struct
  347.         {
  348.             AddrBlock    
  349.                     confirmAddr;            /* ->entity */
  350.             char    newSocket;                /* socket number */
  351.         } Confirm;
  352.     } parm;
  353. } NBPparms;
  354.  
  355. typedef struct
  356. {
  357.     MPPATPHeader
  358.     char            newSelfFlag;            /* self-send toggle flag */
  359.     char            oldSelfFlag;            /* previous self-send state */
  360. } SetSelfparms;
  361.  
  362. typedef struct
  363. {
  364.     MPPATPHeader
  365.     Ptr                nKillQEl;                /* ptr to i/o queue element to cancel */
  366. } NBPKillparms;
  367.  
  368. typedef union                                /* io param record for .MPP calls */
  369. {
  370.     MPPparms        MPP;                    /* General MPP parms */
  371.     LAPparms        LAP;                    /* ALAP calls */
  372.     DDPparms        DDP;                    /* DDP calls */
  373.     NBPparms        NBP;                    /* NBP calls */
  374.     SetSelfparms    SETSELF;    
  375.     NBPKillparms    NBPKILL;                
  376. } MPPParamBlock;
  377.  
  378. /*     These #defines are provided to make life a little easier. The various
  379.     parameter block field names are identical to those shown Inside MacIntosh
  380.     (AppleTalk). They are prefixed with an appropriate driver function acronym
  381.     so that these global symbols might not be duplicated. More of the same are
  382.     provided for the ATP calls below.
  383.     
  384.     Given a variable:
  385.     
  386.     MPPParamBlock    Mpb;
  387.     
  388.     then:
  389.     
  390.     Mpb.MPPioResult = 0;
  391.     
  392.     clears the ioResult field. */
  393.     
  394. #define MPPioCompletion    MPP.ioCompletion        
  395. #define MPPioResult        MPP.ioResult    
  396. #define MPPioRefNum        MPP.ioRefNum        
  397. #define MPPcsCode        MPP.csCode
  398. #define LAPprotType        LAP.protType
  399. #define LAPwdsPointer    LAP.LAPptrs.wdsPointer
  400. #define LAPhandler        LAP.LAPptrs.handler
  401. #define DDPsocket        DDP.socket
  402. #define DDPchecksumFlag    DDP.checksumFlag
  403. #define DDPwdsPointer    DDP.DDPptrs.wdsPointer
  404. #define DDPlistener        DDP.DDPptrs.listener
  405. #define    NBPinterval     NBP.interval
  406. #define NBPcount         NBP.count
  407. #define    NBPntQElPtr     NBP.NBPPtrs.ntQElPtr
  408. #define NBPentityPtr     NBP.NBPPtrs.entityPtr
  409. #define NBPverifyFlag     NBP.parm.verifyFlag
  410. #define NBPretBuffPtr     NBP.parm.Lookup.retBuffPtr
  411. #define NBPretBuffSize     NBP.parm.Lookup.retBuffSize
  412. #define NBPmaxToGet     NBP.parm.Lookup.maxToGet
  413. #define NBPnumGotten     NBP.parm.Lookup.numGotten
  414. #define NBPconfirmAddr     NBP.parm.Confirm.confirmAddr
  415. #define NBPnewSocket     NBP.parm.Confirm.newSocket
  416. #define NBPnKillQEl        NBPKILL.nKillQEl
  417.  
  418. typedef MPPParamBlock    *mppPBptr;
  419.  
  420. #define MOREATPHeader    \
  421.     char            atpSocket;                /* currbitmap for requests */\
  422.                                             /* or ATP socket number */\
  423.     char            atpFlags;                /* control information */\
  424.     AddrBlock        addrBlock;                /* source/dest. socket address */\
  425.     short            reqLength;                /* request/response length */\
  426.     Ptr                reqPointer;                /* ->request/response data */\
  427.     Ptr                bdsPointer;                /* ->response BDS */
  428.     
  429. typedef struct
  430. {
  431.     MPPATPHeader
  432.     MOREATPHeader
  433. } ATPparms;
  434.  
  435. typedef struct
  436. {
  437.     MPPATPHeader
  438.     MOREATPHeader
  439.     char            filler;                    /* numOfBuffs */
  440.     char            timeOutVal;                /* timeout interval */
  441.     char            numOfResps;                /* number of responses actually received */
  442.     char            retryCount;                /* number of retries */
  443.     short            intBuff;                /* used internally for NSendRequest */
  444. } SendReqparms;
  445.  
  446. typedef struct
  447. {
  448.     MPPATPHeader
  449.     MOREATPHeader
  450.     union
  451.     {
  452.         char        bitMap;                    /* bitmap received */
  453.         char        numOfBuffs;                /* number of responses being sent */
  454.         char        rspNum;                    /* sequence number */
  455.     } u0;
  456. } ATPmisc1;
  457.  
  458. typedef struct
  459. {
  460.     MPPATPHeader
  461.     MOREATPHeader
  462.     char            filler;
  463.     char            bdsSize;                /* number of BDS elements */
  464.     short            transID;                /* transaction ID recd. */
  465. } ATPmisc2;
  466.  
  467.  
  468. typedef struct
  469. {
  470.     MPPATPHeader
  471.     MOREATPHeader
  472.     Ptr                aKillQEl;                /* ptr to i/o queue element to cancel */    
  473. } Killparms;
  474.  
  475. typedef union                                /* io param record for .ATP calls */
  476. {
  477.     ATPparms        ATP;                    /* General ATP parms */
  478.     SendReqparms    SREQ;                    /* sendrequest parms */
  479.     ATPmisc1        OTH1;                    /* and a few others */
  480.     ATPmisc2        OTH2;                    /* and a few others */
  481.     Killparms        KILL;                    /* and a few others */
  482. } ATPParamBlock;
  483.  
  484. #define ATPioCompletion    ATP.ioCompletion        
  485. #define ATPioResult        ATP.ioResult        
  486. #define ATPuserData        ATP.userData        
  487. #define ATPreqTID        ATP.reqTID        
  488. #define ATPioRefNum        ATP.ioRefNum        
  489. #define ATPcsCode        ATP.csCode        
  490. #define ATPatpSocket    ATP.atpSocket        
  491. #define ATPatpFlags        ATP.atpFlags        
  492. #define ATPaddrBlock    ATP.addrBlock        
  493. #define ATPreqLength    ATP.reqLength        
  494. #define ATPreqPointer    ATP.reqPointer        
  495. #define ATPbdsPointer    ATP.bdsPointer    
  496. #define ATPtimeOutVal    SREQ.timeOutVal
  497. #define ATPnumOfResps    SREQ.numOfResps
  498. #define ATPretryCount    SREQ.retryCount
  499. #define ATPnumOfBuffs    OTH1.u0.numOfBuffs
  500. #define ATPbitMap        OTH1.u0.bitMap
  501. #define ATPrspNum        OTH1.u0.rspNum
  502. #define ATPbdsSize        OTH2.bdsSize
  503. #define ATPtransID        OTH2.transID
  504. #define ATPaKillQEl        KILL.aKillQEl
  505.  
  506. #define atpXOvalue            32                /* ATP exactly-once bit */
  507. #define atpEOMvalue            16                /* ATP End-Of-Message bit */
  508. #define atpSTSvalue            8                /* ATP Send-Transmission-Status bit */
  509. #define atpTIDValidvalue    2                /* ATP trans. ID valid bit */
  510. #define atpSendChkvalue        1                /* ATP send checksum bit */
  511.  
  512. typedef ATPParamBlock    *atpPBptr;
  513.  
  514.  
  515.  
  516. /****************************************************************************/
  517. /*                                                                            */
  518. /*                        PREFERRED APPLETALK CALLS                            */
  519. /*                                                                            */
  520. /****************************************************************************/
  521.  
  522.     /* .XPP Calls */
  523.         
  524. pascal OSErr OpenXPP(xppRefnum)
  525.     short *xppRefnum;
  526.     extern;
  527.  
  528. pascal OSErr ASPOpenSession(thePBptr, async)
  529.     ASPOpenPrmPtr thePBptr;
  530.     Boolean async;
  531.     extern;
  532.  
  533. pascal OSErr ASPCloseSession(thePBptr, async)
  534.     XPPParmBlkPtr thePBptr;
  535.     Boolean async;
  536.     extern;
  537.  
  538. pascal OSErr ASPAbortOS(thePBptr, async)
  539.     XPPParmBlkPtr thePBptr;
  540.     Boolean async;
  541.     extern;
  542.  
  543. pascal OSErr ASPGetParms(thePBptr, async)
  544.     XPPParmBlkPtr thePBptr;
  545.     Boolean async;
  546.     extern;
  547.  
  548. pascal OSErr ASPCloseAll(thePBptr, async)
  549.     XPPParmBlkPtr thePBptr;
  550.     Boolean async;
  551.     extern;
  552.  
  553. pascal OSErr ASPUserWrite(thePBptr, async)
  554.     XPPParmBlkPtr thePBptr;
  555.     Boolean async;
  556.     extern;
  557.  
  558. pascal OSErr ASPUserCommand(thePBptr, async)
  559.     XPPParmBlkPtr thePBptr;
  560.     Boolean async;
  561.     extern;
  562.  
  563. pascal OSErr ASPGetStatus(thePBptr, async)
  564.     XPPParmBlkPtr thePBptr;
  565.     Boolean async;
  566.     extern;
  567.  
  568. pascal OSErr AFPCommand(thePBptr, async)
  569.     XPPParmBlkPtr thePBptr;
  570.     Boolean async;
  571.     extern;
  572.  
  573. /*******************************************/
  574.         /* .MPP Calls */
  575.         
  576. pascal OSErr PAttachPH(thePBptr,async)
  577.     mppPBptr    thePBptr;
  578.     Boolean        async;
  579.     extern;
  580.     
  581. pascal OSErr PDetachPH(thePBptr,async)
  582.     mppPBptr    thePBptr;
  583.     Boolean        async;
  584.     extern;
  585.     
  586. pascal OSErr PWriteLAP(thePBptr,async)
  587.     mppPBptr    thePBptr;
  588.     Boolean        async;
  589.     extern;
  590.     
  591. pascal OSErr POpenSkt(thePBptr,async)
  592.     mppPBptr    thePBptr;
  593.     Boolean        async;
  594.     extern;
  595.     
  596. pascal OSErr PCloseSkt(thePBptr,async)
  597.     mppPBptr    thePBptr;
  598.     Boolean        async;
  599.     extern;
  600.     
  601. pascal OSErr PWriteDDP(thePBptr,async)
  602.     mppPBptr    thePBptr;
  603.     Boolean        async;
  604.     extern;
  605.     
  606. pascal OSErr PRegisterName(thePBptr,async)
  607.     mppPBptr    thePBptr;
  608.     Boolean        async;
  609.     extern;
  610.     
  611. pascal OSErr PLookupName(thePBptr,async)
  612.     mppPBptr    thePBptr;
  613.     Boolean        async;
  614.     extern;
  615.     
  616. pascal OSErr PConfirmName(thePBptr,async)
  617.     mppPBptr    thePBptr;
  618.     Boolean        async;
  619.     extern;
  620.     
  621. pascal OSErr PRemoveName(thePBptr,async)
  622.     mppPBptr    thePBptr;
  623.     Boolean        async;
  624.     extern;
  625.     
  626. pascal OSErr PSetSelfSend(thePBptr,async)
  627.     mppPBptr    thePBptr;
  628.     Boolean        async;
  629.     extern;
  630.     
  631. pascal OSErr PKillNBP(thePBptr,async)
  632.     mppPBptr    thePBptr;
  633.     Boolean        async;
  634.     extern;
  635.     
  636. /*******************************************/
  637.         /* .ATP Calls */
  638.         
  639. pascal OSErr POpenATPSkt(thePBptr,async)
  640.     atpPBptr    thePBptr;
  641.     Boolean        async;
  642.     extern;
  643.     
  644. pascal OSErr PCloseATPSkt(thePBptr,async)
  645.     atpPBptr    thePBptr;
  646.     Boolean        async;
  647.     extern;
  648.     
  649. pascal OSErr PSendRequest(thePBptr,async)
  650.     atpPBptr    thePBptr;
  651.     Boolean        async;
  652.     extern;
  653.     
  654. pascal OSErr PGetRequest(thePBptr,async)
  655.     atpPBptr    thePBptr;
  656.     Boolean        async;
  657.     extern;
  658.     
  659. pascal OSErr PSendResponse(thePBptr,async)
  660.     atpPBptr    thePBptr;
  661.     Boolean        async;
  662.     extern;
  663.     
  664. pascal OSErr PAddResponse(thePBptr,async)
  665.     atpPBptr    thePBptr;
  666.     Boolean        async;
  667.     extern;
  668.     
  669. pascal OSErr PRelTCB(thePBptr,async)
  670.     atpPBptr    thePBptr;
  671.     Boolean        async;
  672.     extern;
  673.     
  674. pascal OSErr PRelRspCB(thePBptr,async)
  675.     atpPBptr    thePBptr;
  676.     Boolean        async;
  677.     extern;
  678.     
  679. pascal OSErr PNSendRequest(thePBptr,async)
  680.     atpPBptr    thePBptr;
  681.     Boolean        async;
  682.     extern;
  683.     
  684. pascal OSErr PKillSendReq(thePBptr,async)
  685.     atpPBptr    thePBptr;
  686.     Boolean        async;
  687.     extern;
  688.     
  689. pascal OSErr PKillGetReq(thePBptr,async)
  690.     atpPBptr    thePBptr;
  691.     Boolean        async;
  692.     extern;
  693.  
  694. /*******************************************/
  695.         /*    Misc. Calls */
  696.         
  697. pascal void BuildLAPwds(wdsPtr,dataPtr,destHost,prototype,frameLen)
  698.     Ptr            wdsPtr,dataPtr;
  699.     short        destHost,prototype,frameLen;
  700.     extern;
  701.     
  702. pascal void BuildDDPwds(wdsPtr,headerPtr,dataPtr,
  703.                         destAddress,ddpType,dataLen)
  704.     Ptr            wdsPtr,headerPtr,dataPtr;
  705.     AddrBlock    destAddress;
  706.     short        ddpType,dataLen;
  707.     extern;
  708.     
  709. pascal void NBPSetEntity(Buffer,NBPObject,NBPType,NBPZone)
  710.     Ptr            Buffer;
  711.     Ptr            NBPObject,NBPType,NBPZone;                /* PASCAL STRINGS */
  712.     extern;
  713.     
  714. pascal void NBPSetNTE(NTEptr,NBPObject,NBPType,NBPZone,Socket)
  715.     Ptr            NTEptr;
  716.     Ptr            NBPObject,NBPType,NBPZone;                /* PASCAL STRINGS */
  717.     short        Socket;
  718.     extern;
  719.     
  720. pascal short GetBridgeAddress()
  721.     extern;
  722.     
  723. pascal short BuildBDS(BuffPtr,BDSptr,BuffSize)
  724.     Ptr            BuffPtr,BDSptr;
  725.     short        BuffSize;
  726.     extern;
  727.     
  728.  
  729. /****************************************************************************/
  730. /*                                                                            */
  731. /*                        ALTERNATE APPLETALK CALLS                            */
  732. /*                                                                            */
  733. /****************************************************************************/
  734.  
  735. pascal short MPPOpen()
  736.     extern;
  737. pascal short MPPClose()
  738.     extern;
  739. pascal short LAPOpenProtocol(theLAPType,protoPtr)
  740.     short theLAPType;
  741.     Ptr protoPtr;
  742.     extern;
  743. pascal short LAPCloseProtocol(theLAPType)
  744.     short theLAPType;
  745.     extern;
  746. pascal short LAPWrite(abRecord,async)
  747.     ATLAPRecHandle abRecord;
  748.     Boolean async;
  749.     extern;
  750. pascal short LAPRead(abRecord,async)
  751.     ATLAPRecHandle abRecord;
  752.     Boolean async;
  753.     extern;
  754. pascal short LAPRdCancel(abRecord)
  755.     ATLAPRecHandle abRecord;
  756.     extern;
  757. pascal short DDPOpenSocket(theSocket,sktListener)
  758.     short *theSocket;
  759.     Ptr sktListener;
  760.     extern;
  761. pascal short DDPCloseSocket(theSocket)
  762.     short theSocket;
  763.     extern;
  764. pascal short DDPRead(abRecord,retCksumErrs,async)
  765.     ATDDPRecHandle abRecord;
  766.     Boolean retCksumErrs;
  767.     Boolean async;
  768.     extern;
  769. pascal short DDPWrite(abRecord,doChecksum,async)
  770.     ATDDPRecHandle abRecord;
  771.     Boolean doChecksum;
  772.     Boolean async;
  773.     extern;
  774. pascal short DDPRdCancel(abRecord)
  775.     ATDDPRecHandle abRecord;
  776.     extern;
  777. pascal short ATPLoad() extern;
  778. pascal short ATPUnload() extern;
  779. pascal short ATPOpenSocket(addrRcvd,atpSocket)
  780.     AddrBlock addrRcvd;
  781.     short *atpSocket;
  782.     extern;
  783. pascal short ATPCloseSocket(atpSocket)
  784.     short atpSocket;
  785.     extern;
  786. pascal short ATPSndRequest(abRecord,async)
  787.     ATATPRecHandle abRecord;
  788.     Boolean async;
  789.     extern;
  790. pascal short ATPRequest(abRecord,async)
  791.     ATATPRecHandle abRecord;
  792.     Boolean async;
  793.     extern;
  794. pascal short ATPReqCancel(abRecord,async)
  795.     ATATPRecHandle abRecord;
  796.     Boolean async;
  797.     extern;
  798. pascal short ATPGetRequest(abRecord,async)
  799.     ATATPRecHandle abRecord;
  800.     Boolean async;
  801.     extern;
  802. pascal short ATPSndRsp(abRecord,async)
  803.     ATATPRecHandle abRecord;
  804.     Boolean async;
  805.     extern;
  806. pascal short ATPAddRsp(abRecord)
  807.     ATATPRecHandle abRecord;
  808.     extern;
  809. pascal short ATPResponse(abRecord,async)
  810.     ATATPRecHandle abRecord;
  811.     Boolean async;
  812.     extern;
  813. pascal short ATPRspCancel(abRecord,async)
  814.     ATATPRecHandle abRecord;
  815.     Boolean async;
  816.     extern;
  817. pascal short NBPRegister(abRecord,async)
  818.     ATNBPRecHandle abRecord;
  819.     Boolean async;
  820.     extern;
  821. pascal short NBPLookup(abRecord,async)
  822.     ATNBPRecHandle abRecord;
  823.     Boolean async;
  824.     extern;
  825. pascal short NBPExtract(theBuffer,numInBuf,whichOne,abEntity,address)
  826.     Ptr theBuffer;
  827.     short numInBuf;
  828.     short whichOne;
  829.     EntityName *abEntity;
  830.     AddrBlock *address;
  831.     extern;
  832. pascal short NBPConfirm(abRecord,async)
  833.     ATNBPRecHandle abRecord;
  834.     Boolean async;
  835.     extern;
  836. pascal short NBPRemove(abEntity)
  837.     EntityPtr abEntity;
  838.     extern;
  839. pascal short NBPLoad()
  840.     extern;
  841. pascal short NBPUnload()
  842.     extern;
  843. pascal void RemoveHdlBlocks()
  844.     extern;
  845. pascal short GetNodeAddress(myNode,myNet)
  846.     short *myNode,*myNet;
  847.     extern;
  848. pascal Boolean IsMPPOpen() extern;
  849. pascal Boolean IsATPOpen() extern;
  850.  
  851. #endif
  852.